package com.rahms.common.constant;

/**
 * 缓存常量类
 */
public class CacheConstant {

    // 用户相关缓存
    public static final String USER_CACHE_PREFIX = "user:";
    public static final String USER_INFO_CACHE = "user:info:";
    public static final String USER_LIST_CACHE = "user:list:";
    
    // 老人信息相关缓存
    public static final String ELDERLY_CACHE_PREFIX = "elderly:";
    public static final String ELDERLY_INFO_CACHE = "elderly:info:";
    public static final String ELDERLY_LIST_CACHE = "elderly:list:";
    
    // 药品相关缓存
    public static final String MEDICATION_CACHE_PREFIX = "medication:";
    public static final String MEDICATION_INFO_CACHE = "medication:info:";
    public static final String MEDICATION_LIST_CACHE = "medication:list:";
    
    // 用药计划相关缓存
    public static final String DRUG_PLAN_CACHE_PREFIX = "drug_plan:";
    public static final String DRUG_PLAN_INFO_CACHE = "drug_plan:info:";
    public static final String DRUG_PLAN_LIST_CACHE = "drug_plan:list:";
    public static final String DRUG_PLAN_ACTIVE_CACHE = "drug_plan:active:";
    
    // 健康数据相关缓存
    public static final String HEALTH_DATA_CACHE_PREFIX = "health_data:";
    public static final String HEALTH_DATA_LIST_CACHE = "health_data:list:";
    public static final String HEALTH_DATA_STATISTICS_CACHE = "health_data:statistics:";
    
    // 消息相关缓存
    public static final String NOTIFICATION_CACHE_PREFIX = "notification:";
    public static final String NOTIFICATION_LIST_CACHE = "notification:list:";
    public static final String NOTIFICATION_UNREAD_COUNT_CACHE = "notification:unread_count:";
    
    // 系统消息相关缓存
    public static final String SYSTEM_MESSAGE_CACHE_PREFIX = "system_message:";
    public static final String SYSTEM_MESSAGE_LIST_CACHE = "system_message:list:";
    
    // 公告相关缓存
    public static final String ANNOUNCEMENT_CACHE_PREFIX = "announcement:";
    public static final String ANNOUNCEMENT_INFO_CACHE = "announcement:info:";
    public static final String ANNOUNCEMENT_LIST_CACHE = "announcement:list:";
    public static final String ANNOUNCEMENT_LATEST_CACHE = "announcement:latest:";
    
    // JWT Token相关缓存
    public static final String JWT_TOKEN_CACHE_PREFIX = "jwt:token:";
    public static final String JWT_USER_CACHE_PREFIX = "jwt:user:";
    
    // 缓存过期时间（秒）
    public static final long CACHE_EXPIRE_SHORT = 300; // 5分钟
    public static final long CACHE_EXPIRE_MEDIUM = 1800; // 30分钟
    public static final long CACHE_EXPIRE_LONG = 3600; // 1小时
    public static final long CACHE_EXPIRE_VERY_LONG = 7200; // 2小时
    
    // 特殊缓存过期时间
    public static final long JWT_TOKEN_EXPIRE = 7200; // JWT Token 2小时
    public static final long USER_SESSION_EXPIRE = 1800; // 用户会话 30分钟
    public static final long STATISTICS_CACHE_EXPIRE = 600; // 统计数据 10分钟
}
